Skip to content

JS: Migrate to new *Query.qll convention for files only to be imported by queries#6450

Merged
codeql-ci merged 10 commits intogithub:mainfrom
asgerf:js/query-suffix-convention2
Aug 17, 2021
Merged

JS: Migrate to new *Query.qll convention for files only to be imported by queries#6450
codeql-ci merged 10 commits intogithub:mainfrom
asgerf:js/query-suffix-convention2

Conversation

@asgerf
Copy link
Copy Markdown
Contributor

@asgerf asgerf commented Aug 9, 2021

Adopts the convention that files defining a data-flow configuration should end with Query.qll, and such files should only be imported from .ql files. The last part is already enforced by a PR check.

To be consistent with other languages, these library files no longer wrap their contents in a module. So the new way to import the file is:

import semmle.javascript.security.dataflow.Foo::Foo // before
import semmle.javascript.security.dataflow.FooQuery // after

For backwards compatibility, the original file is still there, with a deprecated module alias pointing to the new file.

@asgerf asgerf added the JS label Aug 9, 2021
@asgerf asgerf force-pushed the js/query-suffix-convention2 branch 6 times, most recently from 7be162d to 4cecd50 Compare August 10, 2021 07:03
@asgerf asgerf force-pushed the js/query-suffix-convention2 branch from ef3d5be to a6c3896 Compare August 12, 2021 07:31
@asgerf asgerf marked this pull request as ready for review August 16, 2021 10:57
@asgerf asgerf requested a review from a team as a code owner August 16, 2021 10:57
@asgerf asgerf force-pushed the js/query-suffix-convention2 branch from 67a7c25 to 0047536 Compare August 16, 2021 11:22
Copy link
Copy Markdown
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked a few, and they looked fine.
I assume the rest are good as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants